import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR } = app.Sequelize;
    const model = app.model.define('Admin', {
        admin_id: { type: CHAR(32), primaryKey: true,comment:"主键" },
        admin_username: {type:STRING(32),comment:'账号'},
        admin_password: {type:STRING(32),comment:'密码'},
        admin_token:{type:STRING(32),comment:'登录标识'},
        is_delete: CHAR(1),
    }, { tableName: 't_admin' });
    return model;
};

export class Admin {
    admin_id: string;
    admin_username: string;
    admin_password: string;
    admin_token:string;
    is_delete: string;
}
